<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="unqualified">

	<!-- _______________________________________ Complex type instantiations 
		___________________________________________ -->

	<xs:element name="contextElement" type="ContextElement" />
	<xs:element name="contextAttribute" type="ContextAttribute" />
	<xs:element name="statusCode" type="StatusCode" />
	<xs:element name="subscribeError" type="SubscribeError" />
	<xs:element name="notifyConditionType" type="NotifyConditionType" />
	<xs:element name="restriction" type="Restriction" />
	<xs:element name="subscribeResponse" type="SubscribeResponse" />
	<xs:element name="contextRegistrationAttribute" type="ContextRegistrationAttribute" />
	<xs:element name="contextRegistration" type="ContextRegistration" />
	<xs:element name="operationScope" type="OperationScope" />
	<xs:element name="entityId" type="EntityId" />
	<xs:element name="registrationMetaData" type="RegistrationMetaData" />
	<xs:element name="contextElementResponse" type="ContextElementResponse" />
	<xs:element name="notifyCondition" type="NotifyCondition" />
	<xs:element name="contextMetadata" type="ContextMetadata" />
	<xs:element name="contextRegistrationResponse" type="ContextRegistrationResponse" />


	<!-- _________________________________ Complex type definitions ___________________________________________________ -->


	<xs:complexType name="ContextMetadata">
		<xs:sequence>
			<xs:element name="name" type="xs:string" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="type" type="xs:anyURI" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="value" type="xs:anyType" minOccurs="1"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextMetadataList">
		<xs:sequence>
			<xs:element name="contextMetadata" type="ContextMetadata"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>



	<xs:complexType name="ContextAttribute">
		<xs:sequence>
			<xs:element name="name" type="xs:string" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="type" type="xs:anyURI" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="contextValue" type="xs:anyType"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="metadata" type="ContextMetadataList"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextAttributeList">
		<xs:sequence>
			<xs:element name="contextAttribute" type="ContextAttribute"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="AttributeList">
		<xs:sequence>
			<xs:element name="attribute" type="xs:string" minOccurs="0"
				maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>



	<xs:complexType name="EntityId">
		<xs:sequence>
			<xs:element name="id" type="xs:string" minOccurs="1"
				maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="type" type="xs:anyURI" />
		<xs:attribute name="isPattern" type="xs:boolean" />
	</xs:complexType>

	<xs:complexType name="EntityIdList">
		<xs:sequence>
			<xs:element name="entityId" type="EntityId" minOccurs="1"
				maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="ContextElement">
		<xs:sequence>
			<xs:element name="entityId" type="EntityId" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="attributeDomainName" type="xs:string"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="contextAttributeList" type="ContextAttributeList"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="domainMetadata" type="ContextMetadataList"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextElementList">
		<xs:sequence>
			<xs:element name="contextElement" type="ContextElement"
				minOccurs="1" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="StatusCode">
		<xs:sequence>
			<xs:element name="code" type="xs:int" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="reasonPhrase" type="xs:string"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="details" type="xs:anyType" minOccurs="0"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>



	<xs:complexType name="SubscribeError">
		<xs:sequence>
			<xs:element name="subscriptionId" type="xs:string"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="errorCode" type="StatusCode" minOccurs="1"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:simpleType name="NotifyConditionType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ONTIMEINTERVAL" />
			<xs:enumeration value="ONVALUE" />
			<xs:enumeration value="ONCHANGE" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="UpdateActionType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="UPDATE" />
			<xs:enumeration value="APPEND" />
			<xs:enumeration value="DELETE" />
		</xs:restriction>
	</xs:simpleType>


	<xs:complexType name="NotifyCondition">
		<xs:sequence>
			<xs:element name="type" type="NotifyConditionType"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="condValueList" type="CondValueList"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="restriction" type="xs:string" minOccurs="0"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="NotifyConditionList">
		<xs:sequence>
			<xs:element name="notifyCondition" type="NotifyCondition"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="CondValueList">
		<xs:sequence>
			<xs:element name="condValue" type="xs:string" minOccurs="0"
				maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>



	<xs:complexType name="OperationScopeList">
		<xs:sequence>
			<xs:element name="operationScope" type="OperationScope"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>



	<xs:complexType name="OperationScope">
		<xs:sequence>
			<xs:element name="scopeType" type="xs:string" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="scopeValue" type="xs:anyType" maxOccurs="1"
				minOccurs="1" />
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="Restriction">
		<xs:sequence>
			<xs:element name="attributeExpression" type="xs:string"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="scope" type="OperationScopeList"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="SubscribeResponse">
		<xs:sequence>
			<xs:element name="subscriptionId" type="xs:string"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="duration" type="xs:duration" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="throttling" type="xs:duration"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextRegistrationAttribute">
		<xs:sequence>
			<xs:element name="name" type="xs:string" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="type" type="xs:string" minOccurs="0"
				maxOccurs="1" />
			<xs:element name="isDomain" type="xs:boolean" minOccurs="1"
				maxOccurs="1" />
			<xs:element name="metaData" type="ContextMetadataList"
				minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextRegistrationAttributeList">
		<xs:sequence>
			<xs:element name="contextRegistrationAttribute" type="ContextRegistrationAttribute"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextRegistration">
		<xs:sequence>
			<xs:element name="entityIdList" type="EntityIdList"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="contextRegistrationAttributeList" type="ContextRegistrationAttributeList"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="registrationMetaData" type="RegistrationMetaData"
				minOccurs="0" maxOccurs="1" />
			<xs:element name="providingApplication" type="xs:anyURI"
				minOccurs="1" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="RegistrationMetaData">
		<xs:sequence>
			<xs:element name="contextMetadata" type="ContextMetadata"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>


	<xs:complexType name="ContextElementResponse">
		<xs:sequence>
			<xs:element name="contextElement" type="ContextElement"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="statusCode" type="StatusCode" minOccurs="1"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextElementResponseList">
		<xs:sequence>
			<xs:element name="contextElementResponse" type="ContextElementResponse"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextRegistrationList">
		<xs:sequence>
			<xs:element name="contextRegistration" type="ContextRegistration"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextRegistrationResponseList">
		<xs:sequence>
			<xs:element name="contextRegistrationResponse" type="ContextRegistrationResponse"
				minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="ContextRegistrationResponse">
		<xs:sequence>
			<xs:element name="contextRegistration" type="ContextRegistration"
				minOccurs="1" maxOccurs="1" />
			<xs:element name="errorCode" type="StatusCode" minOccurs="0"
				maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>

</xs:schema>